const fs = require('fs');
const path = require('path');

module.exports = (username) => {
    try {
        const dir = path.join(__dirname, '../../', 'avatars');
        // const init = fs.readFileSync(path.join(dir, 'init.png'));
        // fs.writeFileSync(path.join(dir, username+'.png'), init);
        fs.copyFileSync(path.join(dir, 'init.png'), path.join(dir, username+'.png'))
        return 0
    } catch (err) {
        return err
    }
}

